# $Id$
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Link Dupont <link@subpop.net>

pkgname=mpc
pkgver=0.30
pkgrel=1
pkgdesc='Minimalist command line interface to MPD'
url='https://www.musicpd.org/clients/mpc/'
license=('GPL2')
arch=('x86_64')
makedepends=('meson' 'python-sphinx')
depends=('libmpdclient')
validpgpkeys=('0392335A78083894A4301C43236E8A58C6DB4512')
source=("https://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"{,.sig})
sha256sums=('65fc5b0a8430efe9acbe6e261127960682764b20ab994676371bdc797d867fce'
            'SKIP')

options=('!emptydirs')

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	arch-meson . build
	ninja -C build
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	DESTDIR="${pkgdir}" ninja -C build install 
	install -Dm644 contrib/mpc-completion.bash "${pkgdir}/usr/share/bash-completion/completions/mpc" 
}
